Skip to content

refactor(twine): use py_binary for publishing in WORKSPACE#3734

Merged
rickeylev merged 4 commits intobazel-contrib:mainfrom
aignas:aignas.chore.remove-entry-points
Apr 26, 2026
Merged

refactor(twine): use py_binary for publishing in WORKSPACE#3734
rickeylev merged 4 commits intobazel-contrib:mainfrom
aignas:aignas.chore.remove-entry-points

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented Apr 24, 2026

Remove the reliance on defunct entry point code.

Work towards #3642.

@aignas aignas requested a review from rickeylev as a code owner April 24, 2026 14:41
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the py_wheel rule in python/packaging.bzl to use py_console_script_binary instead of py_binary for the twine publishing target. This change simplifies the implementation by removing the need for manual entry point script generation. Feedback suggests removing the imports = ["."] attribute from the new rule call to prevent potential name collisions and redundant path configurations.

Comment thread python/packaging.bzl Outdated
Comment thread python/packaging.bzl Outdated
@rickeylev rickeylev added this pull request to the merge queue Apr 25, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 25, 2026
@shayanhoshyari
Copy link
Copy Markdown
Contributor

Since py_binary supports main_module now and I think twine also supports python -m twine, what is the reason to not just use py_binary(main_module=...)?

@aignas aignas changed the title refactor(twine): use py_console_script_binary refactor(twine): use py_binary for publishing in WORKSPACE Apr 26, 2026
@aignas aignas enabled auto-merge April 26, 2026 05:05
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@aignas
Copy link
Copy Markdown
Collaborator Author

aignas commented Apr 26, 2026

OK, the last time.

@aignas aignas added this pull request to the merge queue Apr 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 26, 2026
@rickeylev rickeylev merged commit 1567357 into bazel-contrib:main Apr 26, 2026
4 checks passed
@rickeylev
Copy link
Copy Markdown
Collaborator

I force merged to spare us. The network has been super flaky for some reason. I setup an AI to auto-retry yesterday and it took like an hour and dozens of attemps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants